using System;
using System.Collections.Generic;

namespace Book.Blog.Core.Entities
{
    public class Comment : BaseEntity
    {
        public string Content { get; set; } = string.Empty;
        public int LikeCount { get; set; }
        public bool IsApproved { get; set; }
        
        public Guid PostId { get; set; }
        public Guid AuthorId { get; set; }
        public Guid? ParentId { get; set; }
        
        public virtual User Author { get; set; } = null!;
        public virtual Post Post { get; set; } = null!;
        public virtual Comment? Parent { get; set; }
        public virtual ICollection<Comment> Replies { get; set; }

        public Comment()
        {
            Replies = new HashSet<Comment>();
            LikeCount = 0;
            IsApproved = false;
        }
    }
} 